#!/usr/bin/env python3
# -*- coding: utf-8 -*-

'使用路径装饰器的方式[倾向于flask]'

from aiohttp import web

routes = web.RouteTableDef()

@routes.get('/')
async def hello_handler(request):
    return web.Response(text="Hello,world!")

if __name__ == '__main__':
    app = web.Application()
    app.add_routes(routes)
    web.run_app(app)